From 8d1b7362b3f2e3d52153c2ac2e41b8926c05f143 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 7 Mar 2011 17:45:08 +0100 Subject: [PATCH] x11: Copy from actual window, not parent This code is a relic from GTK2 days and should not be necessary anymore, as code now makes sure to only copy those parts of the window that are not overlapped by parent windows. By deleting it we fix potential issues with composited and translucent windows copying the wrong data. https://bugzilla.gnome.org/show_bug.cgi?id=643416 --- gdk/x11/gdkgeometry-x11.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c index aa731dbcbf..580183bf5c 100644 --- a/gdk/x11/gdkgeometry-x11.c +++ b/gdk/x11/gdkgeometry-x11.c @@ -271,22 +271,6 @@ _gdk_x11_window_translate (GdkWindow *window, GdkWindowQueueItem *item; GC xgc; GdkRectangle extents; - GdkWindow *parent; - - /* We need to get data from subwindows here, because we might have - * shaped a native window over the moving region (with bg none, - * so the pixels are still there). In fact we might need to get data - * from overlapping native window that are not children of this window, - * so we copy from the toplevel with INCLUDE_INFERIORS. - */ - parent = window; - while (parent->parent != NULL && - parent->parent->window_type != GDK_WINDOW_ROOT) - { - dx -= parent->parent->abs_x + parent->x; - dy -= parent->parent->abs_y + parent->y; - parent = _gdk_window_get_impl_window (parent->parent); - } cairo_region_get_extents (area, &extents); @@ -302,7 +286,7 @@ _gdk_x11_window_translate (GdkWindow *window, gdk_window_queue (window, item); XCopyArea (GDK_WINDOW_XDISPLAY (window), - GDK_WINDOW_XID (parent), + GDK_WINDOW_XID (window), GDK_WINDOW_XID (window), xgc, extents.x - dx, extents.y - dy, -- 2.30.2